package com.xjie.mall;

import com.baomidou.mybatisplus.annotation.DbType;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;

@SpringBootApplication
//开启mp框架中mapper接口的包扫描
@MapperScan("com.xjie.mall.goods.mapper")
public class MallGoodsApplication {
    public static void main(String[] args) {
        SpringApplication.run(MallGoodsApplication.class,args);
    }

    //配置分页插件
    @Bean
    public PaginationInterceptor paginationInterceptor()
    {
        return new PaginationInterceptor().setDbType(DbType.MYSQL);
    }
}
